
class Base{
  public Base(String s){
    System.out.print("B");
  }
}

public class Test{
  public static Boolean areAlmostEqual(String s1 ,String s2) {
    int a = 0;
    int b = 0;
    int i = 0;
    int count  = 0;
    int len = s1.length();
    if(s1.equals(s2)){
      return true;
    }
    while (i < len){
      if(s1.charAt(i) != s2.charAt(i) ){
        a = b;
        b = i;
        count++;
      }
      i++;
    }
    return count == 2 && s1.charAt(a) == s2.charAt(b) && s1.charAt(b) == s2.charAt(a);
  }


  public static void main(String[] args) {
    System.out.println(areAlmostEqual("bank", "kanb"));
  }
}